<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="umsroot.css">
<TITLE>
Restrictions and Limits
</TITLE>
</HEAD>
<BODY >
<A HREF="umsroot153.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="umsroot158.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H1 CLASS="chapter"><A NAME="htoc338">Appendix&nbsp;F</A>&nbsp;&nbsp;Restrictions and Limits</H1>
<A NAME="chapbugs"></A>
The ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> implementation tries to impose as few limits as possible.
The existing limits are:
<OL CLASS="enumerate" type=1><LI CLASS="li-enumerate">
The maximum arity of a predicate in ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> is 255
(this value can be queried using get_flag(max_predicate_arity,X)).
Note however that the arity of compound terms is unlimited.<BR>
<BR>
<LI CLASS="li-enumerate">The maximum arity of external predicates in the current implementation
of ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> is 16.<BR>
<BR>
<LI CLASS="li-enumerate">The stack and heap sizes have virtual memory limits which can be
changed using the -g, -l, -s and -p command line options or the
ec_set_option function in case of an embedded ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP>.<BR>
<BR>
<LI CLASS="li-enumerate"><A NAME="@default1245"></A>When the occur check is disabled (the default)
it is possible (and sometimes useful) to create cyclic data structures.
E.g. the unification of <I>X</I> and <I>g(X)</I> in
<PRE CLASS="verbatim">
    X = g(X)
</PRE>will result in a cyclic structure
<PRE CLASS="verbatim">
    X = g(g(g(g(g(...)))))
</PRE>Not all ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP> built-in predicates handle cyclic terms gracefully.
Care must be taken with all predicates which traverse the whole term, e.g.
<A HREF="../bips/kernel/termmanip/copy_term-2.html"><B>copy_term/2</B></A><A NAME="@default1246"></A>,
<A HREF="../bips/kernel/typetest/nonground-1.html"><B>nonground/1</B></A><A NAME="@default1247"></A>,
<A HREF="../bips/kernel/termmanip/term_variables-2.html"><B>term_variables/2</B></A><A NAME="@default1248"></A>,
<A HREF="../bips/kernel/termcomp/term_hash-4.html"><B>term_hash/4</B></A><A NAME="@default1249"></A>,
<A HREF="../bips/kernel/ioterm/writeq-2.html"><B>writeq/2</B></A><A NAME="@default1250"></A>,
<A HREF="../bips/kernel/dynamic/assert-1.html"><B>assert/1</B></A><A NAME="@default1251"></A>,
<A HREF="../bips/kernel/compiler/compile_term-1.html"><B>compile_term/1</B></A><A NAME="@default1252"></A>.
These will typically loop or overflow a stack when applied to cyclic terms.
Note however that, starting from version 5.6, cyclic terms are allowed in all
heap copying predicates (setval/2, bag_enter/2, shelf_set/3, store_set/3,
record/2, etc).</OL>


<HR>
<A HREF="umsroot153.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="umsroot158.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
